

	<!-- 当前所在位置 START -->
	{include file="_url.here.tpl"}
	<!-- 当前所在位置 END -->

	<div class="space20"></div>

	<!-- 主体区 -->
	<div class="area">

		<!-- 用户登录 START -->
		<div class="sl_t_block bdcolor-olivine">
			<div class="tt">
				<h2 class="color-olivine">用户登录</h2>
			</div>
			<div class="main-block user-login-reg">
				
				<!-- 表单 START -->
				<div class="form-block">
					<form id="fm_login" action="./index.php?mdl=user&do=login" method="post" target="ajax">
						<input type="hidden" name="formAction" value="{$_act.mdl}_{$_act.do}" />
						<dl ><dt>&nbsp;</dt><dd><h2>用户登录</h2></dd><div class="clear"></div></dl>
						<dl ><dt>用户名：</dt><dd><input type="text" tabindex="1" name="username" value="" class="input" style="width:240px;" /></dd><div class="clear"></div></dl>
						<dl ><dt>密码：</dt><dd><input type="password" tabindex="2" name="password" value="" class="input" style="width:240px;" /></dd><dd>&nbsp;&nbsp;<a href="./index.php?mdl=findpwd&do=account">找回密码</a></dd><div class="clear"></div></dl>
						<dl ><dt>验证码：</dt><dd><input type="text" tabindex="2" name="checkcode" value="" maxlength="4" class="input" style="width:80px;" /></dd><dd><img src="{$_s.app_dir}_checkcode.php" name="ckimg" border="0" id="ckimg" onclick="this.src='{$_s.app_dir}_checkcode.php?t=' + new Date().getTime();" alt="点击可更换另一张" style="margin:0 0 0 10px;vertical-align:middle;cursor:pointer;" /></dd><div class="clear"></div></dl>
						<dl ><dt>&nbsp;</dt><dd><label><input type="checkbox" tabindex="3" name="remember" value="1" checked class="chbox" />30天内自动登录</label></dd><div class="clear"></div></dl>
						<dl ><dt>&nbsp;</dt><dd><input type="submit" tabindex="4" value="登录" class="btn-2th" /></dd><div class="clear"></div></dl>
					</form>
				</div>
				<!-- 表单 END -->

				<!-- 提示信息 START -->
				<div class="form-block">
					<ul class="single_line">
						<li><h2>还不是{$_sysvars.shop_name}商城用户？</h2></li>
						<li>现在免费注册成为{$_sysvars.shop_name}商城用户，便能立刻享受便宜又放心的购物乐趣。</li>
						<li><a href="/index.php?mdl=user&do=register"><b>现在去注册&gt;&gt;</b></a></li>
					</ul>
				</div>
				<!-- 提示信息 END -->
				
				<div class="clear"></div>
			</div>
		</div>
		<!-- 用户登录 END -->

	</div>

	

<script type="text/javascript" language="JavaScript" charset="utf-8">
<!-- 
	{literal}
	jQuery(function($){
		$('#fm_login').submit(function(evt){
			var username	= $.trim($(this).find('input[name="username"]').val());
			var password	= $.trim($(this).find('input[name="password"]').val());
			var checkcode	= $.trim($(this).find('input[name="checkcode"]').val());

			var errmsg = [];
			if(username == '' || username.length < 2)errmsg.push('未输入用户名或少于两个字');
			if(password == '' || password.length < 6)errmsg.push('未输入密码或少于6个字');
			if(checkcode == '' || checkcode.length < 4)errmsg.push('未输入验证码或少于4个字');
			
			if(errmsg.length > 0){
				evt.iscancelled = true;	// 阻止其他事件
				errmsg = errmsg.join('<br />');
				showmsg_warning(errmsg, {title:'表单验证失败'});
				return false;
			}
			return true;
		});
	});

	function callback_login(params) {
		params.msg = params.msg || '登录成功';
		if(params.result == 'succ'){
			params.url = params.url || './index.php?frm=user';
		}else{
			$('#ckimg').attr('src', _s.app_dir+'_checkcode.php?t='+ ((new Date()).getTime()));
		}
		callback_common(params);
	}
	{/literal}
//-->
</script>